﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Fluent;

namespace SPCAM.Plugin.Cam
{
    /// <summary>
    /// CamHeader.xaml 的交互逻辑
    /// </summary>
    public partial class CamHeader :  RibbonTabItem
    {
        RibbonGroupBox rbbox;
        public CamHeader()
        {
            InitializeComponent();
        }
        public void ShowItem(RibbonGroupBox box)
        {
            if (rbbox == null)
            {
                this.Groups.Add(box);
            }
            else
            {
              
                this.Groups[^1] = box;
            }
            rbbox = box;
        }
        public void ClearItem()
        {
            if (rbbox != null)
            {
                this.Groups.Remove(rbbox);
                rbbox = null;
            }
        }
    }
}
